package Lesson;
//求1-5的数据和
public class For02 {
    public static void main(String[] args) {
        int sum = 0;//初始化
        int oddsum = 0;
        int evensum = 0;

        //求总和
        for(int i = 1; i <= 10; i++){
            sum +=i;
            if(i%2 == 0){
                evensum += i;
            }else{
                oddsum += i;
            }
        }

        System.out.println(sum);
        System.out.println(oddsum);
        System.out.println(evensum);
    }
}
